package com.huafeng.attendance.util;

public class MonthTxt {
	private int year;
	private int month;
	
	public MonthTxt(int year, int month) {
		super();
		this.year = year;
		this.month = month;
	}

	public static MonthTxt parse(String monthTxt){
		MonthTxt month = null;
		if(monthTxt != null && monthTxt.length() > 0){
			String[] arr = monthTxt.split("-");
			int y = Integer.parseInt(arr[0]);
			int m = Integer.parseInt(arr[1]);
			month = new MonthTxt(y, m);
		}
		return month;
	}

	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getMonth() {
		return month;
	}

	public void setMonth(int month) {
		this.month = month;
	}
}
